#include <54func.h>
int main(int argc,char *argv[])
{
    // ./7_block_read 1.pipe
    ARGS_CHECK(argc,2);
    int fdr = open(argv[1],O_RDONLY);
    ERROR_CHECK(fdr,-1,"open");

    char buf[4096] = {0};
    sleep(5);//睡个五秒
    while(1){
        read(fdr,buf,sizeof(buf));
        printf("read one,buf = %s\n",buf);
        sleep(2);
    }
    return 0;
}
